package com.ruoyi.human.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.human.mapper.InformedConsentMapper;
import com.ruoyi.human.domain.InformedConsent;
import com.ruoyi.human.service.IInformedConsentService;

/**
 * 知情同意Service业务层处理
 * 
 * @author gw
 * @date 2025-01-06
 */
@Service
public class InformedConsentServiceImpl implements IInformedConsentService 
{
    @Autowired
    private InformedConsentMapper informedConsentMapper;

    /**
     * 查询知情同意
     * 
     * @param consentId 知情同意主键
     * @return 知情同意
     */
    @Override
    public InformedConsent selectInformedConsentByConsentId(Long consentId)
    {
        return informedConsentMapper.selectInformedConsentByConsentId(consentId);
    }

    /**
     * 查询知情同意列表
     * 
     * @param informedConsent 知情同意
     * @return 知情同意
     */
    @Override
    public List<InformedConsent> selectInformedConsentList(InformedConsent informedConsent)
    {
        return informedConsentMapper.selectInformedConsentList(informedConsent);
    }

    /**
     * 新增知情同意
     * 
     * @param informedConsent 知情同意
     * @return 结果
     */
    @Override
    public int insertInformedConsent(InformedConsent informedConsent)
    {
        return informedConsentMapper.insertInformedConsent(informedConsent);
    }

    /**
     * 修改知情同意
     * 
     * @param informedConsent 知情同意
     * @return 结果
     */
    @Override
    public int updateInformedConsent(InformedConsent informedConsent)
    {
        return informedConsentMapper.updateInformedConsent(informedConsent);
    }

    /**
     * 批量删除知情同意
     * 
     * @param consentIds 需要删除的知情同意主键
     * @return 结果
     */
    @Override
    public int deleteInformedConsentByConsentIds(Long[] consentIds)
    {
        return informedConsentMapper.deleteInformedConsentByConsentIds(consentIds);
    }

    /**
     * 删除知情同意信息
     * 
     * @param consentId 知情同意主键
     * @return 结果
     */
    @Override
    public int deleteInformedConsentByConsentId(Long consentId)
    {
        return informedConsentMapper.deleteInformedConsentByConsentId(consentId);
    }
}
